package alvarodelrosal.chat.client.chataction.local;

import alvarodelrosal.chat.client.chataction.infraestructuraremota.AllUsers;
import alvarodelrosal.chat.client.modelo.ChatUser;
import java.util.List;

public class ChatGetUserData implements ChatLocalAction {

    @Override
    public String getName() {
        return "GetUserData";
    }

    @Override
    public void doAction(List<String> parameters) {
        ChatUser user = new ChatUser(Integer.parseInt(parameters.get(0)),
                parameters.get(1), parameters.get(2), Boolean.parseBoolean(parameters.get(3)));

        AllUsers.addUser(user);
    }
}
